<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <a v-bind:href="url">跳转</a>
    <a :href="url">跳转</a>
    
    <button v-on:click="changeUrl">改变</button>
    <button @click="changeUrl">改变</button>
  </div>
  <script src="./vue.js"></script>
  <script>
    new Vue({
      el: '#app',
      data: {
        url: 'http://www.jd.com'
      },
      methods: {
        changeUrl() {
          this.url = 'http://www.itcast.cn'
        }
      }
    })
  </script>
</body>
</html>